<?php
//echo '<pre>';
//print_r($_POST);
//echo '<pre/>';

if(isset($_POST['submit'])){
    if(isset($_POST['username'])&& $_POST['username']!="" ){
        $username = $_POST['username'];
    }
    if(isset($_POST['password'])&& $_POST['password']!="" ){
        $password = $_POST['password'];
    }
    if(isset($_POST['save']) && $_POST['save']=="on") {
        setcookie('username',$username,time() +3600);
        setcookie('password',$password,time() +3600);
    }
}else{
    echo 1;
    die;
}